package com.testmanager.testmananger.shuiyou.strCompare.domain;


import com.testmanager.testmananger.foundation.domain.AbstractAuditingEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

@Entity
@Data
@Accessors(chain = true)
@Table(name = "sy_comparetask")
public class SyCompareTaskEntity extends AbstractAuditingEntity implements Serializable {
    private static final long serialVersionUID = 4164654011994959680L;
//    id
//            name
//    projectid
//            compareid
//    srcdbId
//            destdbId
//    autoflag

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;

    @Column
    private String taskno;
    @Column
    @NotNull(message = "任务名不可为空")
    private String name;
    @Column(name = "projectid")
    private long projectId;
    @Column(name = "scriptid")
    private String scriptId;
    @Column(name = "srcdbid")
    private String  srcDbID;
    @Column(name = "destdbid")
    private  String destDbId;
    @Column(name = "variable_value",length = 512)
    private String variableValue;

    @Column
    private int result = 0; // 0 未执行  1 失败  2 成功
    @Column
    private int autoflag;   // 1 定时执行   0 手动执行

    @Column
    private int status;

    @Column(name = "lastexecutetime")
    private LocalDateTime lastExecuteTime;

    @Column(name = "scriptname")
    private String scriptName;

//    @Column(name = "scriptno")
//    private String scriptNo;
//
//    @Column(name="taskno")
//    private String taskNo;


}
